package com.example.tnot.Teacher.MinePart.InternalFragment.collection.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.example.tnot.Teacher.MinePart.InternalFragment.collection.CollectInternalFragment;

public class vpCollectAdapter extends FragmentStateAdapter {
    public final String[] tabs = {"试卷类", "教案类", "视频类", "课件类"};
    public vpCollectAdapter(@NonNull FragmentActivity fragmentActivity) {
        super(fragmentActivity);
    }

    @NonNull
    @Override
    public Fragment createFragment(int position) {
        return CollectInternalFragment.newInstance(tabs[position]);
    }

    @Override
    public int getItemCount() {
        return tabs.length;
    }
}
